//
//  FQDLabVoteButtonCell.m
//  FakeQDaily
//
//  Created by mewxiv on 9/18/16.
//  Copyright © 2016 Xensius. All rights reserved.
//

#import "FQDLabVoteButtonCell.h"

@interface FQDLabVoteButtonCell ()

@end

@implementation FQDLabVoteButtonCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self prepareUI];
    }
    return self;
}

- (void)prepareUI
{
    UIImage *voteImage = [UIImage imageNamed:@"lab_vote_button_normal"];
    voteImage = [voteImage resizableImageWithCapInsets:UIEdgeInsetsMake(0, 50, 0, 22.5)];
    _voteButton = [UIButton buttonWithType:UIButtonTypeCustom];
    _voteButton.frame = CGRectMake(10, 0, 300, 53);
    [_voteButton setBackgroundImage:voteImage forState:UIControlStateNormal];
    [_voteButton setTitle:@"投票" forState:UIControlStateNormal];
    [_voteButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    
    [self addSubview:_voteButton];
}

+ (NSString *)reuseId
{
    return @"FQDLabVoteButtonCell";
}

@end
